package edu.ahut.corejava;


public class ReflectionDemo {
    public static void main(String[] args) {
//        Date date=new Date();
//        System.out.println(date);
//
//        Calendar calendar=Calendar.getInstance();
//        System.out.println(calendar.toString());
//
//
//        Object date2=new Date();
//        System.out.println(date2);

        Object date3 = null;
        try {
            date3 = Class.forName("java.util.Date").newInstance();
        } catch (InstantiationException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
        System.out.println(date3);
    }
}
